* xterm.c (XTset_vertical_scroll_bar): Use double type for
authorJim Blandy <jimb@redhat.com>
Sat, 12 Jun 1993 17:00:45 +0000 (17:00 +0000)
committerJim Blandy <jimb@redhat.com>
Sat, 12 Jun 1993 17:00:45 +0000 (17:00 +0000)
intermediate results in scaling.

src/xterm.c

index a9a10297befe6a3e48964e4f6135e524779fcc92..b5f87c46cc6ba5c00c5ce63991055a166b695644 100644 (file)
@@ -2135,8 +2135,8 @@ XTset_vertical_scroll_bar (window, portion, whole, position)
        x_scroll_bar_set_handle (bar, 0, top_range, 0);
       else
        {
-         int start = (position * top_range) / whole;
-         int end = ((position + portion) * top_range) / whole;
+         int start = ((double) position * top_range) / whole;
+         int end = ((double) (position + portion) * top_range) / whole;
 
          x_scroll_bar_set_handle (bar, start, end, 0);
        }